package com.baofu.paycore.biz.paycore.handler;

import com.baofu.paycore.manager.model.PayBaseBO;
import com.baofu.paycore.manager.model.ResponseBO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * 统一业务处理
 *
 * <p>
 *  1.需重试接口
 * </p>
 * User: xin deng  Date: 16/7/8 ProjectName: paycore Version: 1.0
 */
@Slf4j
@Service
public class PayBizManager {

    /**
     * 需重试接口
     *
     * @param baseHandler  处理服务
     * @param payBaseBO    处理对象
     * @return             ResponseBO
     * @throws RuntimeException
     */
    @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
    public ResponseBO dalInnerFundProc(BaseHandler baseHandler, PayBaseBO payBaseBO) throws RuntimeException {

        return baseHandler.dalInnerFundProc(payBaseBO);
    }
}
